extern integer idamax_(integer *n, doublereal *dx, integer *incx);
